package com.patttern.creativity.clone;

/**
 * @Author: root
 * @Date: 2018/12/3 21:51
 */
public class Client {
    public static void main(String[] args) throws Exception {
        Address address = new Address("002","笕桥街道");
        Address address1 = (Address) address.clone();
        System.out.println(address.toString());
        System.out.println(address1.toString());
        System.out.println("===============================");
        Person person = new Person("张三",20,address);
        Person person1 = (Person) person.clone();
        address.setCode("003");
        person.setAddress(address);
        System.out.println(person.toString());
        System.out.println("===============================");


        System.out.println(person1.toString());
    }
}
